<<<<<<< HEAD
var add = function(app, callback){

    var core  = require('core')
    ,   userNotNull = require('./userNotNull')
    ,   userNull = require('./userNull')
    ,   model = core.db.model.merchant;
    model.user.count(function(err, length){
        if(err || !length){
            add.sign = true;
=======
var add = function(app,callback){

    var core  = require(app.get('core'))
    ,   userNotNull = require('./userNotNull')
    ,   userNull = require('./userNull')
    ,   model = core.db.model.merchant;

    model.user.count(function(err, length){
        if(err || !length){
            add.sign = false;
>>>>>>> 1be9a16daf7636bc34bee9c37e87bd23f93d4fd2
            add.auth = false;
            add.callback = userNull;
        }else{
            add.sign = true;
            add.auth = true;
            add.callback = userNotNull;
        };
        callback();
    });

};

module.exports = add;